package com.example.demo02;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEvent;


public class Event extends ApplicationEvent {
    private static final Logger logger = LoggerFactory.getLogger(Event.class);

    private final String message;

    public Event(String message) {
        super(message);
        this.message = message;
        logger.info("Add event is successful!  message:{}", message);
    }

    public String getMessage(){
        return message;
    }
}
